package spotGUI.optionsGUI;

import java.awt.BorderLayout;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;
import java.util.ResourceBundle;

public class OptionsFrame extends JFrame {




	private JTabbedPane tabbedPane;
	private JPanel generalPanel;
	private JPanel messengerPanel;
	private JPanel alertsPanel;
	private JScrollPane alertsScrollPane;
	private JPanel fileTransferPanel;
	private JLabel image;
	
	public OptionsFrame() {
		
		setTitle(ResourceBundle.getBundle("spotGUI.optionsGUI.messages").getString("OptionsFrame.this.title")); //$NON-NLS-1$ //$NON-NLS-2$
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setSize(650, 442);
		setLocationRelativeTo(null);
		setResizable(false);
		setIconImage(Toolkit.getDefaultToolkit().getImage(OptionsFrame.class.getResource("/images/Icons/64x64/users_comments.png")));
		
		messengerPanel = new MessengerPanel();
		alertsPanel = new SoundAndPopupEventsList();
		alertsScrollPane = new JScrollPane(alertsPanel);
		alertsScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
		alertsScrollPane.setBorder(new EmptyBorder(10, 10, 0, 10));
		fileTransferPanel = new FileTransferPanel();

		
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBorder(null);

		tabbedPane.add(messengerPanel);
		tabbedPane.setTitleAt(0, ResourceBundle.getBundle("spotGUI.optionsGUI.messages").getString("OptionsFrame.this.messengerPanel"));
		tabbedPane.add(alertsScrollPane);
		tabbedPane.setTitleAt(1, ResourceBundle.getBundle("spotGUI.optionsGUI.messages").getString("OptionsFrame.this.alertsScrollPane"));
		tabbedPane.add(fileTransferPanel);
		tabbedPane.setTitleAt(2, ResourceBundle.getBundle("spotGUI.optionsGUI.messages").getString("OptionsFrame.this.fileTransferPanel"));
		
		
		getContentPane().add(tabbedPane, BorderLayout.CENTER);
		
		image = new JLabel("");
		image.setIcon(new ImageIcon(OptionsFrame.class.getResource("/images/GUIBackgrounds/wavesForFirstRun.png")));
		getContentPane().add(image, BorderLayout.SOUTH);
		
		setVisible(true);
		
	}

	protected JTabbedPane getTabbedPane() {
		return tabbedPane;
	}
}
